<html>
<head>
<meta charset="UTF-8">
<title>批次管理首页</title>
<link id="easyuiTheme" href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
<script src="../../static/easyui/jquery.cookie.js" type="text/javascript"></script>
<script src="../../static/easyui/ui-theme.js" type="text/javascript"></script>
<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
<script src="../../ffres/dict/all.js" type="text/javascript"></script>
<link href="../../static/easyui/themes/frameless.css" rel="stylesheet" type="text/css"/>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<script type="text/javascript">

    //获取url参数
    var subsCode=$.getUrlParam("subsCode");
    function addTab(title, url){
        if ($('#tt').tabs('exists', title)){
            $('#tt').tabs('select', title);
        } else {
            var content = '<iframe scrolling="auto" frameborder="0" src="'+url+'" style="width:100%;height:99%;"></iframe>';
            $('#tt').tabs('add',{
                title:title,
                content:content,
                closable:true
            });
        }
    }

    $(function(){
        //获取url参数
        var subsCode=$.getUrlParam("subsCode");
        //修改west标题为子系统名称
        $.restfulGet('../../api/s/subs/info/' + subsCode,null,function(data){
            if (data){
                var temp= $('#cc').layout("panel","west");
                temp.panel("setTitle",data.rows.subsName);
                $("#sysName").html(data.rows.subsName)
			}
        });
        //addTab("批次信息","BatBatchInfoConfigList.html?subsCode="+subsCode);
		$("#a11").click();
    });

</script>
</head>
<body id="cc" class="easyui-layout">
	<!-- 右侧  菜单资源树形栏 -->
	<div id="1" data-options="region:'west',title:'系统',split:true" style="width: 220px;">
		<div id="sm" data-toggle="topjui-sidemenu" data-options="data:data">
		</div>
		<div>

		<ul class="easyui-tree" data-options="animate:true,lines:true"
			id="menu_app1">
			<li><span><span id="sysName"></span></span>
				<ul>
						<li><span><a id="a01"
								onclick="javascript:addTab($(this).text(),'SSubsDatasourceList.html?subsCode='+subsCode)"
								target="centerFrame">数据源</a></span></li>
						<li><span><a id="a02"
								onclick="javascript:addTab($(this).text(),'ScheduleMontior.html?subsCode='+subsCode)"
								target="centerFrame">执行节点</a></span></li>
						<li><span>批次配置</span>
							<ul>
								<li><span><a id="a11"
										onclick="javascript:addTab($(this).text(),'BatBatchInfoConfigList.html?subsCode='+subsCode)"
										target="centerFrame">批次信息</a></span></li>
								<li><span><a id="a21"
										onclick="javascript:addTab($(this).text(),'BatBatchStageConfigList.html')"
										target="centerFrame">批次阶段</a></span></li>
								<li><span><a id="a23"
										onclick="javascript:addTab($(this).text(),'PluginServiceParamList.html')"
										target="centerFrame">服务参数</a></span></li>
								<li><span><a id="a12"
										onclick="javascript:addTab($(this).text(),'SSrvsCronConfList.html?subsCode='+subsCode)"
										target="centerFrame">触发配置</a></span></li>
							</ul></li>
					<li><span>批次监控</span>
						<ul>
							<li><span><a id="a45"
										 onclick="javascript:addTab($(this).text(),'BatInstBatchList.html?subsCode='+subsCode)"
										 target="centerFrame">批次监控</a></span></li>
						</ul>
					</li>

				</ul>
			</li>
		</ul>			
		</div>

	</div>
	<!-- 中间  内容主体 -->
	<div data-options="region:'center',border:false" title="" style="padding: 0px; background: #eee;">
		<!-- 资源操作 start -->
		<div class="easyui-panel" data-options="region:'center', border:'false'" style="height:95%">

			<div id="tt" class="easyui-tabs" fit="true" border="false" >
			</div>

		</div><!-- 资源操作 end -->
	</div>
</body>
</html>
